package org.jeecg.modules.storage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.AutoRecordLog;
import org.jeecg.common.aspect.annotation.LogtimeEntityListener;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.EntityListeners;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 入库单明细
 * @Author: jeecg-boot
 * @Date:   2024-07-04
 * @Version: V1.0
 */
@ApiModel(value="buss_storage_detail对象", description="入库单明细")
@Data
@TableName("buss_storage_detail")
@AutoRecordLog(value = 1,existParent = true,parentFiled="storageId",parentTable="buss_storage",ignoreCloumn = {"isPrint"})
@EntityListeners(LogtimeEntityListener.class)
public class BussStorageDetail implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**物料id*/
	@Excel(name = "物料id", width = 15)
    @ApiModelProperty(value = "物料id")
    private String materialId;
	/**数量*/
	@Excel(name = "数量", width = 15)
    @ApiModelProperty(value = "数量")
    private java.math.BigDecimal num;
	/**客户物料编号*/
	@Excel(name = "客户物料编号", width = 15)
    @ApiModelProperty(value = "客户物料编号")
    private String customerMaterialNo;
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
	/**库位*/
	@Excel(name = "库位", width = 15)
    @ApiModelProperty(value = "库位")
    private String storehouse;
	/**入库单id*/
    @ApiModelProperty(value = "入库单id")
    private String storageId;
	/**生产车间*/
	@Excel(name = "生产车间", width = 15)
    @ApiModelProperty(value = "生产车间")
    private String workshop;
	/**供应商*/
	@Excel(name = "供应商", width = 15)
    @ApiModelProperty(value = "供应商")
    private String supplierId;
	/**供应商*/
	@Excel(name = "供应商", width = 15)
    @ApiModelProperty(value = "供应商")
    private String supplierName;
	/**客户名称*/
	@Excel(name = "客户名称", width = 15)
    @ApiModelProperty(value = "客户名称")
    private String customerName;
	/**物料批号*/
	@Excel(name = "物料批号", width = 15)
    @ApiModelProperty(value = "物料批号")
    private String materialLotNum;
	/**生产日期*/
	@Excel(name = "生产日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "生产日期")
    private Date createDate;
	/**限用日期*/
	@Excel(name = "限用日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "限用日期")
    private Date expiryDate;
	/**通知明细id*/
	@Excel(name = "通知明细id", width = 15)
    @ApiModelProperty(value = "通知明细id")
    private String noticeDetailId;
	/**行项目*/
	@Excel(name = "行项目", width = 15)
    @ApiModelProperty(value = "行项目")
    private String rowNum;
	/**关联单据*/
	@Excel(name = "关联单据", width = 15)
    @ApiModelProperty(value = "关联单据")
    private String superiorCode;
	/**物料种类*/
	@Excel(name = "物料种类", width = 15)
    @ApiModelProperty(value = "物料种类")
    private String materialTypeName;
	/**辅助数量*/
	@Excel(name = "辅助数量", width = 15)
    @ApiModelProperty(value = "辅助数量")
    private String supportNum;
	/**辅助单位*/
	@Excel(name = "辅助单位", width = 15)
    @ApiModelProperty(value = "辅助单位")
    private String supportUnit;
	/**质检状态*/
    //待质检	0	编辑删除
    //合格	1	编辑删除
    //不合格	2	编辑删除
    //让步接收	3
	@Excel(name = "质检状态", width = 15)
    @ApiModelProperty(value = "质检状态")
    private Integer qcStatus;
	/**库位id*/
	@Excel(name = "库位id", width = 15)
    @ApiModelProperty(value = "库位id")
    private String erpLocationId;
	/**批次号*/
	@Excel(name = "批次号", width = 15)
    @ApiModelProperty(value = "批次号")
    private String batchNum;
	/**入库日期*/
	@Excel(name = "入库日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "入库日期")
    private Date warehouseDate;
	/**当前状态*/
	@Excel(name = "当前状态", width = 15)
    @ApiModelProperty(value = "当前状态")
    private Integer stauts;

    @Excel(name = "当前状态", width = 16)
    @ApiModelProperty(value = "入库数量")
    private BigDecimal storageNum;

    @JsonIgnore
    @ApiModelProperty(value = "日志时间")
    private String logtime;

    /**
     * 父类日志时间-方便历史搜索
     */
    @JsonIgnore
    @ApiModelProperty(value = "日志时间")
    private String parentLogtime;


}
